package entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.ForceDiscriminator;

@Entity
@ForceDiscriminator
public class Organization extends OrganizationElement{

	private String vision, mission;
	
	@OneToMany(mappedBy="organization", fetch = FetchType.LAZY)
	@Cascade({CascadeType.ALL, CascadeType.DELETE_ORPHAN})
	private List<OrganizationUnit> listaOrganizationUnit;
	
	@OneToMany(mappedBy="organization", fetch = FetchType.LAZY)
	@Cascade({CascadeType.ALL, CascadeType.DELETE_ORPHAN})
	private List<OrganizationValues> organizationValuesList;
		
	public void setMission(String mission) {
		this.mission = mission;
	}

	public String getMission() {
		return mission;
	}

	public void setVision(String vision) {
		this.vision = vision;
	}

	public String getVision() {
		return vision;
	}

	public void setListaOrganizationUnit(List<OrganizationUnit> listaOrganizationUnit) {
		this.listaOrganizationUnit = listaOrganizationUnit;
	}

	public List<OrganizationUnit> getListaOrganizationUnit() {
		return listaOrganizationUnit;
	}

	public void setOrganizationValuesList(List<OrganizationValues> organizationValuesList) {
		this.organizationValuesList = organizationValuesList;
	}

	public List<OrganizationValues> getOrganizationValuesList() {
		return organizationValuesList;
	}
}
